package com.whsw.scheduler.trading_center_scheduler;

import cn.hutool.db.DbUtil;
import cn.hutool.db.ds.DSFactory;
import cn.hutool.db.ds.simple.SimpleDSFactory;
import cn.hutool.log.level.Level;
import cn.hutool.setting.Setting;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableScheduling;

@SpringBootApplication
@EnableScheduling
public class TradingCenterSchedulerApplication {

    public static void main(String[] args) {
        SpringApplication.run(TradingCenterSchedulerApplication.class, args);
    }

    @Bean
    public DSFactory dsFactory(){
        DSFactory dsFactory = new SimpleDSFactory();
        DbUtil.setShowSqlGlobal(true, true, true, Level.DEBUG);
        return dsFactory;
    }

}
